/*
 * @Description:
 * @Author: william
 * @Date: 2024-07-02 16:41:14
 * @LastEditors: william
 * @LastEditTime: 2025-09-12 15:16:15
 */
const prefix = `/message`
const prefix2 = `/chat/message`
const prefix3 = `/chat/group`
const prefix4 = `/chat/dialog`

// =====================  消息管理 =====================
// -------------------- 查询消息数量 --------------------
export const apiQueryCount = data => g_https.post(`${prefix}/queryCount`, data)

// -------------------- 查询消息列表 --------------------
export const apiQueryList = data => g_https.post(`${prefix}/queryList`, data)

// -------------------- 修改消息状态 --------------------
export const apiUpdateStatus = data =>
  g_https.post(`${prefix}/updateStatus`, data)

// =====================  消息管理-聊天消息 =====================

// -------------------- 修改聊天消息 --------------------
export const apiMsgUpdate = data => g_https.post(`${prefix2}/update`, data)

// -------------------- 撤回聊天消息 --------------------
export const apiMsgRecall = data => g_https.post(`${prefix2}/recall`, data)

// -------------------- 查询聊天消息详情 --------------------
export const apiMsgQuery = data => g_https.post(`${prefix2}/query`, data)

// -------------------- 查询聊天消息列表 --------------------
export const apiMsgList = (data, headers = {}, extraParmas) =>
  g_https.post(`${prefix2}/list`, data, headers, extraParmas)

// -------------------- 删除聊天消息 --------------------
export const apiMsgDelete = data => g_https.post(`${prefix2}/delete`, data)

// -------------------- 发送聊天消息 --------------------
export const apiMsgCreate = data => g_https.post(`${prefix2}/create`, data)

// -------------------- 修改聊天群组 --------------------
export const apiGroupUpdate = data => g_https.post(`${prefix3}/update`, data)

// -------------------- 查询聊天群组详情 --------------------
export const apiGroupQuery = data => g_https.post(`${prefix3}/query`, data)

// -------------------- 查询聊天群组列表 --------------------
export const apiGroupList = data => g_https.post(`${prefix3}/list`, data)

// -------------------- 删除聊天群组 --------------------
export const apiGroupDelete = data => g_https.post(`${prefix3}/delete`, data)

// -------------------- 创建聊天群组 --------------------
export const apiGroupCreate = data => g_https.post(`${prefix3}/create`, data)

// -------------------- 修改聊天对话 --------------------
export const apiDialogUpdate = data => g_https.post(`${prefix4}/update`, data)

// -------------------- 未读消息清零 --------------------
export const apiDialogUnreadCountZero = data =>
  g_https.post(`${prefix4}/unreadCountZero`, data)

// -------------------- 查询聊天对话详情 --------------------
export const apiDialogQuery = data => g_https.post(`${prefix4}/query`, data)

// -------------------- 查询聊天对话列表 --------------------
export const apiDialogList = data => g_https.post(`${prefix4}/list`, data)

// -------------------- 删除聊天对话 --------------------
export const apiDialogDelete = data => g_https.post(`${prefix4}/delete`, data)

// -------------------- 创建聊天对话 --------------------
export const apiDialogCreate = data => g_https.post(`${prefix4}/create`, data)

// -------------------- 查询未读消息条数 --------------------
export const apiDialogUnreadCount = data =>
  g_https.get(`${prefix4}/unreadCount`, data)
